--- dkms.in	2025-03-12 03:50:51.281669477 -0300
+++ dkms.in	2025-03-23 13:23:57.816951483 -0300
@@ -1208,6 +1208,17 @@
     fi
 }
 
+check_clang()
+{
+    set_kernel_source_dir "$kernelver"
+    if [[ ! -z $(strings ${kernel_source_dir}/vmlinux | grep clang) ]] ; then
+        _clangopts="CC=clang LD=ld.lld AR=llvm-ar NM=llvm-nm RANLIB=llvm-ranlib STRIP=llvm-strip OBJCOPY=llvm-objcopy"
+        echo "Using llvm tools..."
+    else
+        _clangopts=""
+    fi
+}
+
 # Build a module that has been registered with DKMS.
 prepare_and_actual_build()
 {
